package com.main.hotel.repository;

import com.main.hotel.entity.ManagerToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
@Repository
public interface  ManagerTokenRepository extends JpaRepository<ManagerToken, Integer>,
            JpaSpecificationExecutor<ManagerToken> {
        @Query(value = "select * from manager_token where manager_id= ?1", nativeQuery = true)
        ManagerToken findByManagerId(int manager_id);
    }


